package com.unionpay.db;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.unionpay.entity.StatuscodeEntity;
import com.unionpay.mapper.StatuscodeEntityMapper;

/**
 * statuscode表操作
 * 
 * @author liuzy
 * @since 2016年4月29日
 */
public class TblStatusCode {

	static StatuscodeEntityMapper mapper = Mybaties.getMapper(StatuscodeEntityMapper.class);

	/**
	 * 查询所有状态码
	 */
	public static Map<String, String> queryAll() {
		Map<String, String> map = new HashMap<String, String>();
		 List<StatuscodeEntity> entitys = mapper.selectAll();
		 for (StatuscodeEntity entity : entitys) {
			 map.put(entity.getCode(), entity.getMessage());
		}
		return map;
	}
}
